package com.happy_lab_management.demo.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.happy_lab_management.entity.System;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface SystemMapper extends BaseMapper<System> {

    @Select("select `value` from `system_map` where `key`=#{key}")
    Integer getValueByKey(String key);

    @Update("update `system_map` set `value` = #{value} where `key` =#{key}")
    Boolean setValueByKey(String key, Integer value);

}
